import pytest
from unittest.mock import patch
from game import handle_user_input

@pytest.mark.parametrize('user_input, return_func', [
        ('w', 'w'), 
        ('s', 's'), 
        ('d', 'd'),
        ('a','a')])
def test_input_keys(user_input,return_func):
    with patch('builtins.input', return_value=user_input):
        assert handle_user_input() == return_func

@pytest.mark.parametrize('user_input', [
        (''), 
        ('123'), 
        ('dert'),
        ('G')])
def test_input_not_keys(user_input):
    with patch('builtins.input', return_value=user_input):
        assert handle_user_input() is None